﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;
using DAL;
using Public;


namespace BUL
{
    public class BatchBUL
    {
        BatchDAL cls = new BatchDAL();
        public DataSet LoadAllBatch()
        {
            return cls.LoadAllBatch();
        }

        public DataTable SelectProductOfBatch(int batchId)
        {
            return cls.SelectProductOfBatch(batchId);
        }
        public DataTable getTotalSpending(int batchId)
        {
            return cls.getTotalSpending(batchId);
        }
        public string getUserOfBatch(int batchId)
        {
            DataTable dt = cls.SelectProductOfBatch(batchId);
            return dt.Rows[0][0].ToString();
        }
        public int AddProductBatchDetails(BatchDetails batchDetails)
        {
            return cls.AddProductBatchDetails(batchDetails);
        }
        public int UpdateProductBatchDetails(BatchDetails batchDetails)
        {
            return cls.UpdateProductBatchDetails(batchDetails);
        }
        public DataTable getCurrentQuantity(int productId)
        {
            return cls.getCurrentQuantity(productId);
        }
        public DataTable getImportedDate(int batchId)
        {
            return cls.getImportedDate(batchId);
        }
        public int AddBatchDetails(BatchDetails batchDetails)
        {
            return cls.AddBatchDetails(batchDetails);
        }
    }
}
